package com.authine.cloudpivot.ext.enums.inquiry;

/**
 * Created by continue on 2021/6/4
 * 询价单上的供应商来源范围
 * 部分供应商表示被邀请的可报价
 * 全部供应商表示全平台供应商可报价
 */
public enum VendorScopeEnum {
    fill("0", "填充"),
    SOME("1", "部分供应商"),
    ALL("2", "全部供应商"),
    SOME_AND_ALL("3", "平台+邀请");

    private String code;
    private String des;

    private VendorScopeEnum(String code, String des) {
        this.code = code;
        this.des = des;
    }

    public static VendorScopeEnum get(Integer code) {
        for (VendorScopeEnum c : VendorScopeEnum.values()) {
            if (c.code.equals(code.toString())) {
                return c;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public String getDes() {
        return des;
    }

    @Override
    public String toString() {
        return "code:" + code + ", des:" + des;
    }
}
